package com.ag.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbLogPlanStep entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_LOG_PLAN_STEP", schema = "dbo", catalog = "AGDB")
public class TbLogPlanStep implements java.io.Serializable {

	// Fields

	private String psId;
	private TbLogPlanStep tbLogPlanStep;
	private TbPlan tbPlan;
	private TbEvent tbEvent;
	private String psName;
	private String psContent;
	private String a;
	private String b;
	private String c;
	private Date startTime;
	private Date endTime;
	private Set<TbLog> tbLogs = new HashSet<TbLog>(0);
	private Set<TbLogPsContent> tbLogPsContents = new HashSet<TbLogPsContent>(0);
	private Set<TbLogPlanStep> tbLogPlanSteps = new HashSet<TbLogPlanStep>(0);

	// Constructors

	/** default constructor */
	public TbLogPlanStep() {
	}

	/** minimal constructor */
	public TbLogPlanStep(String psId, String psName) {
		this.psId = psId;
		this.psName = psName;
	}

	/** full constructor */
	public TbLogPlanStep(String psId, TbLogPlanStep tbLogPlanStep,
			TbPlan tbPlan, TbEvent tbEvent, String psName, String psContent,
			String a, String b, String c, Date startTime, Date endTime,
			Set<TbLog> tbLogs, Set<TbLogPsContent> tbLogPsContents,
			Set<TbLogPlanStep> tbLogPlanSteps) {
		this.psId = psId;
		this.tbLogPlanStep = tbLogPlanStep;
		this.tbPlan = tbPlan;
		this.tbEvent = tbEvent;
		this.psName = psName;
		this.psContent = psContent;
		this.a = a;
		this.b = b;
		this.c = c;
		this.startTime = startTime;
		this.endTime = endTime;
		this.tbLogs = tbLogs;
		this.tbLogPsContents = tbLogPsContents;
		this.tbLogPlanSteps = tbLogPlanSteps;
	}

	// Property accessors
	@Id
	@Column(name = "PS_ID", unique = true, nullable = false, length = 16)
	public String getPsId() {
		return this.psId;
	}

	public void setPsId(String psId) {
		this.psId = psId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TB__PS_ID")
	public TbLogPlanStep getTbLogPlanStep() {
		return this.tbLogPlanStep;
	}

	public void setTbLogPlanStep(TbLogPlanStep tbLogPlanStep) {
		this.tbLogPlanStep = tbLogPlanStep;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "P_ID")
	public TbPlan getTbPlan() {
		return this.tbPlan;
	}

	public void setTbPlan(TbPlan tbPlan) {
		this.tbPlan = tbPlan;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "E_ID")
	public TbEvent getTbEvent() {
		return this.tbEvent;
	}

	public void setTbEvent(TbEvent tbEvent) {
		this.tbEvent = tbEvent;
	}

	@Column(name = "PS_NAME", nullable = false, length = 200)
	public String getPsName() {
		return this.psName;
	}

	public void setPsName(String psName) {
		this.psName = psName;
	}

	@Column(name = "PS_CONTENT", length = 500)
	public String getPsContent() {
		return this.psContent;
	}

	public void setPsContent(String psContent) {
		this.psContent = psContent;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "START_TIME", length = 23)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_TIME", length = 23)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLogPlanStep")
	public Set<TbLog> getTbLogs() {
		return this.tbLogs;
	}

	public void setTbLogs(Set<TbLog> tbLogs) {
		this.tbLogs = tbLogs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLogPlanStep")
	public Set<TbLogPsContent> getTbLogPsContents() {
		return this.tbLogPsContents;
	}

	public void setTbLogPsContents(Set<TbLogPsContent> tbLogPsContents) {
		this.tbLogPsContents = tbLogPsContents;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbLogPlanStep")
	public Set<TbLogPlanStep> getTbLogPlanSteps() {
		return this.tbLogPlanSteps;
	}

	public void setTbLogPlanSteps(Set<TbLogPlanStep> tbLogPlanSteps) {
		this.tbLogPlanSteps = tbLogPlanSteps;
	}

}